- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe
- link_end = '</a>'.html_safe
= email_default_heading(_("We've detected some unusual activity"))
%p
  - repositories_text = n_('repository', 'repositories', @max_project_downloads)
  - within_seconds_text = n_('%d second', '%d seconds', @within_seconds) % @within_seconds
  - within_minutes_text = n_('%d minute', '%d minutes', @within_minutes) % @within_minutes
  - within_text = @within_minutes > 0 ? within_minutes_text : within_seconds_text
  = _('We want to let you know %{username} has exceeded the Git rate limit due to them downloading more than %{max_project_downloads} project %{repositories_text} within %{within_text}.') % { username: sanitize_name(@user.name), max_project_downloads: @max_project_downloads, repositories_text: repositories_text, within_text: within_text }

- if @auto_ban_enabled
  %p
    = _('Because you enabled auto-banning, we have also automatically banned this user from %{scope}. If this is a mistake, you can %{link_start}unban them%{link_end}.').html_safe % { scope: @ban_scope, link_start: link_start % { url: @banned_page_url }, link_end: link_end }

%p
  = _('You can adjust rules on auto-banning %{link_start}here%{link_end}.').html_safe % { link_start: link_start % { url: @settings_page_url }, link_end: link_end }
